package com.echo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.echo.entity.bean.PageResult;
import com.echo.entity.dto.*;
import com.echo.entity.pojo.Topic;
import com.echo.entity.vo.TopicListVO;
import org.springframework.stereotype.Service;

/***
 * @date   2021/8/2 0002 15:12
 * @author JackeyTower
 */
@Service
public interface TopicService extends IService<Topic> {

    public void addTopic(TopicAddDTO topicAddDTO);

    //用户删除自己的话题
    public void deleteTopicByCreator(TopicDeleteDTO topicDeleteDTO) throws Exception;

    //用户更新自己的话题内容
    public void updateTopicByCreator(TopicUpdateDTO topicUpdateDTO);

    //分页获取所有话题列表简略信息（按时间排序）
    public PageResult<TopicListVO> getAllPaginatedTopic(PageParamDTO pageParamDTO);

    //条件查询话题
    public PageResult<TopicListVO> getAllPaginatedTopicListByParam(TopicQueryByParamDTO topicQueryByParamDTO);

    //给某话题点赞
    public void giveLikeForTopic(String topicId);
}
